package com.jdiv.input;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.image.BufferedImage;

import com.jdiv.JDiv;

//import com.jdiv.JProcess;

//public class JMouse extends JProcess implements MouseListener{
public class JMouse implements MouseListener,MouseMotionListener{

public int x=0;
public int y=0;
public int graph=0;
public boolean left=false;
public boolean right=false;
public BufferedImage image=null;
 
	public JMouse(){
		
	//	JDiv.setMouseListener(this);
	//	JDiv.setMouseMotionListener(this);
		
	
	}
//	public void begin(){}
	public void mouseEntered(MouseEvent e){}
	public void mouseExited(MouseEvent e){}
	public void mousePressed(MouseEvent e){
		if (e.getButton()==MouseEvent.BUTTON1) left=true;
		if (e.getButton()==MouseEvent.BUTTON2) right=true;
	
		
	}
	
	public void mouseReleased(MouseEvent e){
		
		if (e.getButton()==MouseEvent.BUTTON1) left=false;
		if (e.getButton()==MouseEvent.BUTTON2) right=false;
		
	}
	public void mouseClicked(MouseEvent e){
		
		x=e.getX();
		y=e.getY();
	}
	
	
    public void mouseMoved(MouseEvent e) {
    	x=e.getX();
		y=e.getY();
    }

     public void mouseDragged(MouseEvent e) {
    		
 		x=e.getX();
 		y=e.getY();
 		
     }

	
//	public void loop(){}

	
}
